<template>
  <div>
    <hr>
    <p>--这是一个子组件--{{ aa }}--{{ cc }}</p>
    <button @click="add" />
  </div>
</template>

<script>
export default {
  name: 'VueHrSon',
  props: {
    aa: {
      type: Number,
      required: true
    },
    cc: {
      type: Number,
      required: true
    }
  },
  data() {
    return {

    }
  },

  mounted() {

  },

  methods: {
    add(){
        this.$emit('update:aa', this.aa + 1);
        this.$emit('update:cc', this.cc + 1);
    }

  }
}
</script>

<style lang="scss" scoped>

</style>
